package cn.qzbook.service;

import cn.qzbook.MybatisTool;
import cn.qzbook.dao.ManyToMany.StuDaoMapper;
import cn.qzbook.domain.Stu;
import org.junit.Test;

public class StuService {

    private StuDaoMapper dao = MybatisTool.sqlSessionFactory().openSession(true).getMapper(StuDaoMapper.class);

    public void selectStuService(int id){
        Stu stu = dao.selectStuAndAllTeachs(id);
        System.out.println(stu);
    }

    //单元测试
    @Test
    public void test(){
        new StuService().selectStuService(2);
    }
}
